<!--
 * @Description:  第二十四章（兄弟组件传参和Bus） mitt
 * @Author: IA ia@kepro.space
 * @Date: 2025-02-18 17:29:57
-->
<template>
  <div>
    <h1>我是A组件</h1>
    <div>
      <el-button type="info" @click="emit">emit</el-button>
    </div>
  </div>
</template>
<script setup lang="ts">
import { getCurrentInstance } from 'vue'

const instance = getCurrentInstance()

const emit = () => {
  instance?.proxy?.$Bus.emit('chuancan1', '参数值1')
  instance?.proxy?.$Bus.emit('chuancan2', '参数值2')
  instance?.proxy?.$Bus.emit('chuancan3', '参数值3')
}
</script>
<style scoped></style>
